package com.financial.business.base.constants;

/**
 * @author WANGNING
 * @api {post}
 * @email wyn20140226@aliyun.com
 * @tar 公共业务类型枚举
 * @date 2019/11/4 17:29
 * @apiGroup 所属服务
 * @apiVersion 2.0.0
 */
public enum FinancialBusinessTypeConstants {
    /*------银盛相关业务10-----*/
    YS_REPORT(101, "银盛报备"),

    YS_PAY(102, "银盛支付"),

    YS_SPLIT(103, "银盛分账"),

    YS_REFUND(104, "银盛退款"),

    YS_WITHDRAWAL(105, "银盛提现"),

    YS_PAYMENT(106, "银盛代付"),

    YS_QUERY(107, "银盛查询"),

    /*------汇收银相关业务20-----*/
    HEEMONEY_REPORT(201, "汇收银报备"),

    HEEMONEY_PAY(202, "汇收银支付"),

    HEEMONEY_SPLIT(203, "汇收银分账"),

    HEEMONEY_REFUND(204, "汇收银退款"),

    HEEMONEY_WITHDRAWAL(205, "汇收银提现"),

    HEEMONEY_PAYMENT(206, "汇收银代付"),

    HEEMONEY_QUERY(207, "汇收银查询"),

    /*------够样余额相关业务30-----*/

    BALANCE_PAY(302, "够样余额支付"),

    BALANCE_SPLIT(303, "够样余额分账"),

    BALANCE_REFUND(304, "够样余额退款"),

    BALANCE_WITHDRAWAL(305, "够样余额提现"),

    BALANCE_PAYMENT(306, "够样余额代付"),

    BALANCE_QUERY(307, "够样余额查询"),

    /*------优店积分相关业务40-----*/

    INTEGRAL_PAY(402, "优店积分支付"),

    INTEGRAL_SPLIT(403, "优店积分分账"),

    INTEGRAL_REFUND(404, "优店积分退款"),

    INTEGRAL_WITHDRAWAL(405, "优店积分提现"),

    INTEGRAL_PAYMENT(406, "优店积分代付"),

    INTEGRAL_QUERY(407, "优店积分查询");

    /**
     * 状态值
     */
    private int value;

    /**
     * 类型描述
     */
    private String description;


    private FinancialBusinessTypeConstants(int value, String description) {
        this.value = value;
        this.description = description;
    }

    public int value() {
        return value;
    }

    public String valueStr() {
        return String.valueOf(value);
    }

    public String description() {
        return description;
    }


    public static FinancialBusinessTypeConstants valueOf(int value) {
        for (FinancialBusinessTypeConstants type : FinancialBusinessTypeConstants.values()) {
            if (type.value() == value) {
                return type;
            }
        }
        return null;
    }

}
